package com.myweb.exception;


/**
 * 
* @ClassName: WebException 
* @Description: 自定义异常
* @author Damon·Jing
* QQ:2811001300
* @date 2017年10月27日 上午10:42:56 
*
 */
public class WebException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	
	/**
	 * 错误返回码
	 */
	private int retCode;
	/**
	 * 异常
	 */
	private Throwable cause;
	/**
	 * 异常描述
	 */
	private String causeMessage;
	
	public int getRetCode() {
		return retCode;
	}

	public void setRetCode(int retCode) {
		this.retCode = retCode;
	}

	public Throwable getCause() {
		return cause;
	}

	public void setCause(Throwable cause) {
		this.cause = cause;
	}

	public String getCauseMessage() {
		return causeMessage;
	}

	public void setCauseMessage(String causeMessage) {
		this.causeMessage = causeMessage;
	}
	
	public WebException(){}
	
	public WebException(int retCode, Throwable cause, String causeMessage) {
		super(causeMessage,cause);
		this.retCode = retCode;
		this.cause = cause;
		this.causeMessage = causeMessage;
	}
	
	public String  toString(){
		return "retCode = " + this.retCode + " || cause = " + this.cause + " || causeMessage = " + this.causeMessage;
	}

}
